home *** CD-ROM | disk | FTP | other *** search
/ The Amiga Game Guide / AmigaGameGuide_CD.iso / Amiga / Game-Demos / HereticII-Demo / h2demo.lha / Notes on Memory < prev    next >
Text File  |  2000-04-19  |  5KB  |  122 lines

  1. Notes on memory:
  2. ----------------
  3.  
  4. Heretic II requires at least 64 Megabytes of memory.  Depending on the
  5. size of  your workbench or  workbench replacement, there might  not be
  6. enough memory  available, especially  if you use  the GL  renderer. If
  7. this is the case,  try to free up as much memory  as possible. You can
  8. try to
  9.  
  10. - Open just a shell, then quit workbench (works with DirectoryOpus)
  11. - Remove the background image if you have one
  12. - Disable all sounds
  13. - Boot  with no  startup sequence  and  just load  what is  absolutely
  14.   required 
  15. - Disable WBStartup
  16.  
  17. Try to get free memory to about 60 megs. The full game will include an
  18. AREXX  program that automatically  sets up  a reset-proof  Ramdisk and
  19. boots from there.
  20.  
  21. Additionally, there is a caching system for sounds and images/textures
  22. that allows you to restrict the  amount of these items that may remain
  23. in memory  at any  time. This yields  a slight performance  penalty as
  24. this data  must be reconstructed  from the disk representation  on the
  25. fly during the game, but will ensure  that the game may be run with 64
  26. Megs of memory. 
  27.  
  28. These caches  get their size  from "console variables". There  are two
  29. ways to set  a console variable, either from the  command line of your
  30. shell, or from the in-game console. 
  31.  
  32. To  set a  variable  from the  command  line, use  the following  when
  33. starting Heretic II:
  34.  
  35. stack 600000
  36. heretic2 +set variablename value
  37.  
  38. "variablename" is the  name of the variable, and  "value" is the value
  39. you want  to set this to.  Multiple "set" commands can  be issued this
  40. way, each with a "+" in front:
  41.  
  42. heretic2 +set var1 value1 +set var2 value2
  43.  
  44. The following variables control the size of the caches:
  45.  
  46. ami_soundcache
  47.     Controls the  size of the  sound file cache.  This is preset  to a
  48.     reasonable value  by default, but setting it  to something bigger,
  49.     like 5000000 will  greatly enhance playing on a  machine with more
  50.     than 64 megabytes. 
  51.  
  52. ami_imagecache
  53.     This  controls the  size of  the texture  cache in  the *software*
  54.     renderer  only. This  is preset  to 2500000,  meaning it  will use
  55.     approximately 2.5  Megabytes of memory for  textures, which should
  56.     be  enough for most  systems. Setting  this to  a bigger  value is
  57.     recommended for machines with more memory. 
  58.  
  59. gl_texturecache
  60.     This variable  controls the  size of the  texture cache in  the GL
  61.     renderer. Since  the textures are  bigger in the GL  version, this
  62.     defaults to 4000000.  You may try to reset this  to a lower value,
  63.     but  anything  below 3000000  will  most  likely provoke  in-frame
  64.     swapping   of   textures,  which   might   slow   the  game   down
  65.     considerably. 
  66.  
  67. As an example,  lets set the sound cache to 5  megs and the imagecache
  68. to 3 megs:
  69.  
  70. heretic2 +set ami_soundcache 5000000 +set ami_imagecache 3000000
  71.  
  72. The  alternative way  of setting  the  variables is  from the  in-game
  73. console. To open the console during the menu, either select the "Go to
  74. console" from  the options menu, or  press the ESCAPE  key. During the
  75. game, press the "tilde" key to drop down the console. 
  76.  
  77. Once in the console, you can enter commands. To verify the contents of
  78. a variable, just  enter its name and press Return.  To set a variable,
  79. enter the same sequence you  would have entered from the command line,
  80. but without the "+", for example
  81.  
  82. set ami_soundcache 5000000
  83.  
  84. Further notes on reducing memory consumption for the GL renderer:
  85. -----------------------------------------------------------------
  86.  
  87. Heretic  II  uses   high-resolution  textures,  especially  for  model
  88. skins. These  tend to  take up large  amounts of memory  (for example,
  89. Corvus the elf's  texture is 256x256 pixels in size,  that's 128 KB of
  90. memory for a single texture). There are two console variables that are
  91. responsible  for controlling the  size of  textures.  These  are named
  92. "gl_picmip"  and "gl_skinmip",  respectively.  gl_picmip controls  the
  93. size of normal (level) textures, while gl_skinmip controls the size of
  94. skins. 
  95.  
  96. Their contents  is a  numerical value that  specifies how  many mipmap
  97. levels are  to be skipped.  Both are pre-set  to "0", meaning  that no
  98. levels are skipped  and the full texture resolution  is used. Anything
  99. bigger than 0 will skip this many levels. 
  100.  
  101. If you  just want to  accept that this  can reduce your memory,  it is
  102. sufficient to say  that the higher the gl_picmip  or gl_skinmip level,
  103. the less memory a texture map  will require. As a drawback, the higher
  104. the value is, the more will you downgrade the visual appearance. It is
  105. not advisable to set either value to anything above 3.
  106.  
  107. If you want  to know what is happening, read  on. Otherwise, you might
  108. skip to the next section.
  109.  
  110. To understand  how this  works, you  should know what  a mipmap  is. A
  111. Mipmap is a  collection of multiple texture maps  with different sizes
  112. that are  used to  prevent loosing details  when a polygon  is further
  113. away. For any texture, there are subsequent texture maps with the same
  114. image, scaled  to half the  size, so that  a 256x256 texture  map will
  115. have subsequent images of 128x128,  64x64, 32x32, 16x16, 8x8, 4x4, 2x2
  116. and 1x1 Pixels.  Of course, a 256x256 texture map  looks better than a
  117. 128x128 texture  map, but you  might want to  accept this fact  and go
  118. with  less memory  consumption;  in this  case,  setting gl_picmip  or
  119. gl_skinmip to 1  will skip the first level (256x256  in this case) and
  120. start with the second level (128x128 in this case).
  121.  
  122.